USDΒΆ

Guerilla Render supports data in USD format.

Use native USD materials
  1. If a primitive has an USD material assignment, it will be transferred to Guerilla. All the material attributes (shader name and parameters) will be properly set.
  2. If you wish to use this native USD material, make sure that no shader (e.g. surface2) gets affected to these primitives in the render graph, as this would overwrite the native material.
  3. Parameters binding is automatic. An implementation of the USD shader must be available. An "UsdPreviewSurface" implementation is provided in "library/materials/USD/UsdPreviewSurfaceSurface.gmaterial".
Assign shaders
  1. USD primitives may be referenced by path as usual.
  2. If a primitive has an USD material assignment, a tag of the form "Mtl:materialName" will be automatically set.
        def Mesh "tagged_mesh"
        {
            rel material:binding = </tag_from_materialBinding>
        }
        def Material "tag_from_materialBinding"
        {
            ....
        }
    
  3. If a primitive has a custom metadata named "GuerillaTags", a guerilla tag will be set. This may be a string or an array of strings.
        def Mesh "tagged_mesh" (
            kind = "model"
            customData = {
                string[] GuerillaTags = [ "tag_from_customMetaData" ]
            }
        )
        {
            ....
        }
    
  4. If a primitive has a custom string attribute named "GuerillaTags" or "guerilla:tags", a guerilla tag will be set. Several tags can be comma-separated in this field.
        def Mesh "tagged_mesh"
        {
            custom string guerilla:tags = "tag_from_customAttribute"
        }
    
Use a USD point instancer
  1. USD point instancer is a procedural generator, instancing prototypes on a point cloud.
  2. Prototypes may be shaded by path or by tag in a render graph.
  3. Per instance variations may be achieved using the "instanceId" attribute.